<?php 
/** Load header
*/
$this->load->view('header', $template) ;
?>
<link href='http://fonts.googleapis.com/css?family=Allura' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php echo base_url() ?>assets/css/book-info.css">
<!-- ---------------------------------------------------------- -->

	<style type="text/css">
		.wrapper { padding: 10px; }
	</style>
	
	<section class="bg-blue">
		<div class="wrapper" style="padding-top: 30px;">
			<div class="book-cover">
				<img src="<?php echo $book_cover; ?>" alt="" >
			</div>

			<div class="main-info">
				<h1><?php echo $book_info['name_document'] ?></h1>
				<p>Tác giả: <?php echo $book_info['author'] ?></p>
				<p>Danh mục: <?php echo $book_info['category'] ?></p>
				<p>Người up: <?php echo $book_info['username'] ?></p>
			</div>
		</div>
	</section>

	<section class="description">
		<div class="wrapper">
			<h2>Lời dẫn: </h2>
			<p><?php echo $book_info['description'] ?></p>
		</div>
	</section>

	<section class="table-of-content bg-darker">
		<div class="wrapper">
			<h2>Mục lục: </h2>

			<?php 
			foreach($toc as $node) {
				echo '<p style="margin: 10px;">
					<a href="'.base_url().'book/read/'.$book_info['id_document'].'/'.$node['id'].'">'.$node['text'].'</a></p>';
			}
			 ?>
		</div>
	</section>

<!-- ---------------------------------------------------------- -->

<?php
/** Load Footer
*/
$this->load->view('footer') ;
?>